<!DOCTYPE html>
<html>
  <head>
    <title>全部成绩</title>
    <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">

{include file='center/head' /}
<script>
	$.showLoading();
	$(document).ready(function() { 
		$.hideLoading();
	})
</script>
<style>
	.weui-navbar__item {
	    position: relative;
	    display: block;
	    -webkit-box-flex: 1;
	    -webkit-flex: 1;
	    flex: 1;
	    padding: 5px 0;
	    text-align: center;
	    font-size: 14px;
	    -webkit-tap-highlight-color: rgba(0,0,0,0);
	}
	.weui-navbar__item.weui-bar__item_on {
	    background-color: #1AAD19;
	}
	.weui-navbar__item {
	    color: #ffffff;
	}
	.weui-cells {
	    margin-top: 1.17647059em;
	    background-color: #fff;
	    line-height: 1.47058824;
	    font-size: 14px;
	    overflow: hidden;
	    position: relative;
	}
	.weui-dialog__bd{
		text-align: -webkit-left;
	}
</style>
	</head>
<body ontouchstart>
	<div class="weui-navbar" style="margin-top: 20px;margin-left: 20%;width: 60%;">
        <div class="weui-navbar__item weui-bar__item_on">
            全部成绩
        </div>
        <div class="weui-navbar__item" id="clear" style="color: #000000">
            刷新全部成绩
        </div>
        
    </div>
	<div style="margin-top: 70px;" class="weui-cells__title">年度学期说明：<br/>2014-2015学年第一学期为2014/上学期，2014-2015学年第二学期为2014/下学期；依此类推。
	<br/>
	<span style="color: #4C4C4C">点击课程名称可查看该课程学分、类别等信息~~</span>
	</div>
	{volist name="score" id="vo" key="k"}
	<!-- 列表组顶部说明文字 -->
	<div class="weui-cells__title" style="color: #1AAD19;">{$vo.team}</div>
	<!-- 带说明的列表 -->
	<div class="weui-cells">
		{volist name="vo['info']" id="sub" key="kk"}
		<a href="javascript:;" onclick="alertdata('{php}echo trim($sub[0]);{/php}','{$sub[1]}','{$sub[2]}','{$sub[3]}','{$sub[4]}','{$sub[5]}');" class="weui-cell weui-cell_access">
	        <div class="weui-cell__bd">
	            <p>{$sub[0]}</p>
	        </div>
	        <div class="weui-cell__ft">{$sub[1]}</div>
	    </a>
	    {/volist}
	</div>
	{/volist}
</body>

{include file='center/foot' /}
<script>
	function alertdata(title,score,xufen,nian,team,leibie){
		var data = "课程名称:"+title+"<br/>"+"成绩:"+score+"<br/>"+"学分:"+xufen+"<br/>"+"学期:"+nian+"年 "+team+"学期"+"<br/>"+"课程类别:"+leibie;
		$.alert(data, title);
	}

	$("#clear").click(function(){
		$.showLoading();
		$.ajax({
			type: 'post',
			url: '{:url('Clear/clear')}',
			data: {

			}, success: function (res) {
				$.hideLoading();
				if(res.status == 1){
				   $.toast("更新成功");
				   location.reload();
				}else{
					$.toast("更新失败", "cancel");
				}	
				
			}, error: function (res) {
				$.hideLoading();
				$.toast("网络故障", "forbidden");
			   
			}
        });
	})
</script>
</html>